﻿<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl" %>
<% if (ViewData["HintMessage"] != null)
   {
       PhotoGallery.Infrastructure.Helpers.HintMessage message = ViewData["HintMessage"] as PhotoGallery.Infrastructure.Helpers.HintMessage;
       if (message != null)
       {
           string className = "cy-ui-results " + ((message.Type == PhotoGallery.Infrastructure.Helpers.HintMessageType.Error) ? "error" : "");%>
<script type="text/javascript">
$(function(){
    cy.ui.showResult({ content:<%= PhotoGallery.Infrastructure.Helpers.JavascriptHelper.ToEscapedJavaScriptString(HttpUtility.HtmlEncode(message.Content), '\"', true) %>, className: '<%= className %>' });
    });
</script>
<%}
   } %>